<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<!--新增入库弹窗 start-->
<div class="content-layerbody-main" id="add">
    <form name="credentialForm" id="credentialForm">
        <div class="body-main">
            <div id="proAttached">
                <table class="add-table form-table">
                    <tbody>
                    <tr>
                        <th><span class="required">地区：</span></th>
                        <td>
                            <div class="layui-inline">
                                <div class="layui-input-inline">
                                    <div class="bus-plugIn" id="certificateArea1">
                                        <input type="hidden" name="certificateAreaId" class="plug-in-msg"/>
                                        <input type="hidden" name="certificateArea" class="plug-in-code"/>
                                        <input type="text" style="width: 240px" readonly placeholder="请选择" class="chose-plugIn layui-input" id="certificateAreaChange" name="areaName">
                                        <div class="bus-picker">
                                            <div class="bus-picker-tab">
                                                <a href="javascript:void(0);" class="active">请选择</a>
                                            </div>
                                            <div class="bus-picker-content"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th><span class="required">证书类型：</span></th>
                        <td>
                            <select class="select-style" name="certificateType" id="certificateType" onchange="loadCertificateType('240px','#certificateType','${generalType}',1,'#certificateSpecialtys',0,'#certificateLevel')">
                                <option value="">请选择</option>
                            </select>
                        </td>
                    </tr>
                    <tr>
                        <th><span class="required">证书专业：</span></th>
                        <td>
                            <div class="layui-input-inline">
                                <select class="select-style" id="certificateSpecialtys"
                                        style="width:240px">
                                    <option value="">请先选择证书类型</option>
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th><span class="required">证书等级：</span></th>
                        <td>
                            <div class="layui-input-inline">
                                <select class="select-style" name="certificateLevel" id="certificateLevel" style="width:240px">
                                    <option value="">请先选择证书类型</option>
                                </select>
                            </div>
                        </td>
                    </tr>
                    <tr>
                        <th><span class="required">库存数量：</span></th>
                        <td>
                            <input name="stockQuantity" id="stockQuantity" style="width: 240px;border: 1px solid #e1d0d0;" placeholder="请输入库存数量" oninput = "value=value.replace(/[^\d]/g,'')">
                        </td>
                    </tr>
                    </tbody>
                </table>
            </div>
        </div>
    </form>
</div>
<!--新增入库弹窗 end-->
<script src="${rootUrl}/static/js/zzsc/fine_edit_page.js?v=${version}"></script>
<script>
    $(function () {
        /**
         * 资质类型、证书专业以及证书级别三级联动判断
         * @param obj 证书类型
         * @param generalType 大类型(证书或资质)编码
         * @param type 联动类型  0-查询证书类型 1-根据证书类型查询证书专业  2-不加载证书级别
         * @param isLoadLevel 是否加载证书级别 0-加载 1-不加载
         * @param certificateSpecialtyObj 证书专业
         * @param certificateLevelObj 证书级别
         */
        loadCertificateType('100%', '#certificateType', '${generalType}', 0);

        //异步加载
        Plug.plug_ins(
            "get",
            "${cmsBaseUrl}/api/cms/tree_book/v1/get_tree_book_list.do?code=2147483647&type=2&level=1",
            "#certificateArea1",
            '请选择地区',
            function () {
            },
            true, '2147483647'
        );
    })

</script>